/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pope.table;

/**
 *
 * @author zxw
 */
public class MusicModel {

    public static final String[] TITLES = {
        "文件", "地址", "大小"
    };
    
    public final static int COLUMN_NAME = 0;
    public final static int COLUMN_URL = 1;
    public final static int COLUMN_SIZE = 2;
    
    private String name;// 名称
    private String url; // 地址
    private String size;  // 字节
    
    // -------------------------------------------------- 构造函数
    
    public MusicModel(String name, String url) {
        this.name = name;
        this.url = url;
    }
    
    public MusicModel(String name, String url, String size) {
        this(name, url);
        this.size = size;
    }
    
    
    public Object getColumnValue(int columnIndex) {
        switch (columnIndex) {
            case COLUMN_NAME:{ return name;}
            case COLUMN_URL:{ return url;}
            case COLUMN_SIZE:{ return size;}
        }
        return null;
    }
    
    // -------------------------------------------------- 构造函数
    
    public String getName() {
        return name;
    }
    
    public String getUrl() {
        return url;
    }

}
